## Process this file with automake to produce Makefile.in

SUFFIXES=.def .opn .dat

SUBDIRS = . tools

EXTRA_DIST = smbuilt.dat mylib.h backup.h ndir.h smstubio.c

lib_LTLIBRARIES = libscrmgr.la
noinst_LIBRARIES = libmylib.a

libmylib_a_SOURCES = \
addcomma.c \
array.c \
backup.c \
field.c \
fname.c \
fqn.c \
ndir.c \
re_fail.c \
regex.c \
string.c \
undo_esc.c \
utimes.c
libmylib_a_CFLAGS = -DSM_SYSV

libscrmgr_la_SOURCES = \
smio.c \
smlib.c \
smread.c \
smwrite.c \
smfield.c \
smscreen.c \
smutil.c \
smgetfl.c \
smwhere.c \
smdb.c \
smbuilt.c \
smio.h \
smlib.h \
smbuilt.dat
libscrmgr_la_CFLAGS = -DSM_SYSV
include_HEADERS = smio.h smlib.h

BUILT_SOURCES = sm2c_temp smbuilt.opn

.dat.opn:
	LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./sm2c_temp $<
.dat.def:
	LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./sm2c_temp $<

sm2c_temp: tools/sm2c.c smstubio.c smlib.c smread.c
	$(CC) -DSM_SYSV -I. -L. $(LDFLAGS) -o $@ tools/sm2c.c smstubio.c smlib.c smread.c array.c fqn.c fname.c string.c

